import requests
import os

def spider01():
  response  = requests.get('http://baidu.com/s',headers = {'User-Agent':'Mozilla/4.0'}, params={'wd': '猫'})

  h = open('../file/h.html', 'a', encoding='utf8')
  with h as f:
    f.write(response.text)

if __name__ == '__main__':
  spider01()